<section class="text-center loginscreen fadeInDown">
	<div class="ibox-content">
		<div style="margin-bottom:30px;">
		<div class="pull-right"><button type="button" class="btn btn-large btn-primary" ng-click="vm.add()">新增</button></div>
	    <h2>设备管理</h2>
	    </div>
	    <table class="table">
	        <thead>
	            <tr>
	                <th>设备名称</th>
	                <th>唯一标识</th>
	                <th>可用状态</th>
	                <th>绑定打卡点</th>
	                <th>赛事</th>
	                <th>机构</th>
	                <th>操作</th>
	            </tr>
	        </thead>
	        <tbody>
	            <tr ng-repeat="item in vm.materialLists">
	                <td>{{item.title}}</td>
	                <td>{{item.name}}</td>
	                <td>{{item.status == 'enable' ? '可用' : '不可用'}}</td>
	                <td><a ui-sref="dashboard.race.cpedit({cp_id: item.cp_id, company_id: item.company_id, race_id: item.race_id})" >{{item.cp_name}}</a></td>          
	                <td><a ui-sref="dashboard.race.detail({company_id: item.company_id, race_id: item.race_id})" >{{item.disp_name}}</a></td>
	                <td><a ui-sref="dashboard.list({company_id: item.company_id})" >{{item.company_name}}</a></td>
	                <td>
	                    <a ng-if="item.cp_id" ng-click="vm.unbind(item.name, item.mid)">解绑设备</a>
	                    <a ng-if="!item.cp_id" style="color: #337ab7;" ng-click="vm.setMaterial(item.name, item.mid)">分配设备</a>
	                </td>
	            </tr>
	        </tbody>
	    </table>
	</div>
</section>